﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.SQL.Core;

namespace Pixysoft.SQL
{
    public class SqlCreator
    {
        public static ISQLSelectExpression Select(params string[] columns)
        {
            SQLStringBuilder builder = new SQLStringBuilder();

            builder.Append("SELECT");

            builder.AppendBlank();

            foreach (string column in columns)
            {
                builder.Append("{0},", column);
            }

            builder.Remove(builder.Length - 1, 1);

            return new SQLSelectExpression(builder);
        }

        public static ISQLSelectExpression SelectAll()
        {
            SQLStringBuilder builder = new SQLStringBuilder();

            builder.Append("SELECT *");

            return new SQLSelectExpression(builder);
        }
    }
}
